<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #template {
        display: none;
      }
    </style>
  </head>
  <body>
    <!--  
          1. 属性 （普通属性）
          2. 绑定的属性 （指令）
          3. 事件处理函数（指令）
    -->

      <!-- <div style="color: red" :style="[{backgroundColor: 'orange'}]">sss</div> -->
      <!-- <div class='a b' :class="['e', 'd', {f: true, g: false}]">sss</div> -->
      <!-- <div style="color: red">sss</div> -->
      <!-- <div style="color: red" :style="[{backgroundColor: 'orange'}]">sss</div> -->
      <!-- <div style="color: red" :style="styles">sss</div> -->
      <!-- <div name="nameValue" :[age]="ageVal" id="idValue"></div> -->

      <!-- <div name="nameValue" age="ageVal" id="idValue" v-cloak></div> -->
      <!-- <div onClick="xxx" @click="handleClick" v-bind="obj" ></div> -->
      <!-- <div name="name" age="age"></div> -->
    <div id="template">
      <div :name="name" :age="age"></div>
    </div>
    <div id="app"></div>
    <script src="../../../../packages/vue/dist/vue.global.js"></script>

    <script>
      const { createApp, ref } = Vue

      const template = document.querySelector('#template')?.innerHTML
      const App = {
        setup() {
          const value = ref(true)
          const add = () => value.value++
          return {
            value,
            add
          }
        },
        template
      }

      createApp(App).mount('#app')
    </script>
  </body>
</html>
